{extend name="shop/showstore/common/store_layout" /}
{block name="content"}

<?php 
//加载店铺装修静态页
if(isset($decoration_file)) { 
    require($decoration_file);
} 
?>
<?php if(!$store_decoration_only) {?>
<div class="wrapper" style="width:100%; margin:0 auto; text-align:center">
<div class="flexslider">
      <ul class="slides">
        <?php if(!empty($store_slide) && is_array($store_slide)){?>
        <?php for($i=0;$i<5;$i++){?>
        <?php if($store_slide[$i] != ''){?>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/{$store_slide[$i]}') no-repeat center center;" <?php if($store_slide_url[$i] != '' && $store_slide_url[$i] != 'http://'){?>href="<?php echo $store_slide_url[$i];?>"<?php }?>></a></li>
        <?php }?>
        <?php }?>
        <?php }else{?>        
        <li><a style="background:url('__UPLOAD_PATH__/shop/store/slide/f01.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f02.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f03.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f04.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <?php }?>
      </ul>
    </div>
</div>  
  
<div id="main">
	<ul id="main1">
		<!--背景图一-->
		<?php if(!empty($store_bg[0])){?>
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[0]}">
		<?php }else{?>
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-2.jpg">
		<?php }?>
		
		<ul id="main1-left">
			{volist name="town_goods_list" id="vo" length='4'}
				<li>
					<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
						<img src="{:cthumb($vo['goods_image'], 240,$vo['store_id'])}">
					</a>
				</li>
			{/volist}
		</ul>
		<ul id="main1-right">
			<li>
				<!--广告一-->
	        	<?php if(!empty($store_adv[0])){?>
					<a href="{$store_adv_url[0]}">
						<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[0]}">
					</a>
				<?php }?>
			</li>
			
		</ul>
	</ul>
	
	<ul id="main2">
		<!--背景图二-->
		<?php if(!empty($store_bg[1])){?>
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[1]}">
		<?php }else{?>
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-3.jpg">
		<?php }?>
		
		<li>
			<!--广告二-->
        	<?php if(!empty($store_adv[1])){?>
				<a href="{$store_adv_url[1]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[1]}">
				</a>
			<?php }?>
		</li>
		
	</ul>
	
	<ul id="main3">
		<!--背景图三-->
		<?php if(!empty($store_bg[2])){?>
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[2]}">
		<?php }else{?>
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-4.jpg">
		<?php }?>
		
		<ul id="main3-left">
			<li>
				<!--广告三-->
	        	<?php if(!empty($store_adv[2])){?>
					<a href="{$store_adv_url[2]}">
						<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[2]}">
					</a>
				<?php }?>
			</li>
		</ul>
		<ul id="main3-right">
			<li style="margin-bottom:20px">
				<!--广告四-->
	        	<?php if(!empty($store_adv[3])){?>
					<a href="{$store_adv_url[3]}">
						<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[3]}">
					</a>
				<?php }?>
			</li>
			<li>
				<!--广告四-->
	        	<?php if(!empty($store_adv[4])){?>
					<a href="{$store_adv_url[4]}">
						<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[4]}">
					</a>
				<?php }?>
			</li>
		</ul>
	</ul>
	
	<ul id="main4">
		<!--背景图四-->
		<?php if(!empty($store_bg[3])){?>
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[3]}">
		<?php }else{?>
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-10.jpg">
		<?php }?>
		
		<!-- <p class="main4-p">店长推荐</p> -->
		<li>
			<!--广告五-->
        	<?php if(!empty($store_adv[5])){?>
				<a href="{$store_adv_url[5]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[5]}">
				</a>
			<?php }else{?>
				<a href="#">
					<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-11.png" alt="">
				</a>
			<?php }?>

			<?php if(!empty($store_adv[6])){?>
				<a href="{$store_adv_url[6]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[6]}">
				</a>
			<?php }else{?>
				<a href="#">
					<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-12.png" alt="">
				</a>
			<?php }?>
				<?php if(!empty($store_adv[7])){?>
				<a href="{$store_adv_url[7]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[7]}">
				</a>
			<?php }else{?>
				<a href="#">
					<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-13.png" alt="">
				</a>
			<?php }?>
			<?php if(!empty($store_adv[8])){?>
				<a href="{$store_adv_url[8]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[8]}">
				</a>
			<?php }else{?>
				<a href="#">
					<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-14.jpg" alt="">
				</a>
			<?php }?>

		</li>

	
	</ul>
	
	<ul id="main5">
		<!--背景图五-->
		<?php if(!empty($store_bg[4])){?>
			<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[4]}">
		<?php }else{?>
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-15.png" alt="">
		<?php }?>
			
		<!--广告九-->
        	<!--<?php if(!empty($store_adv[8])){?>
				<a href="{$store_adv_url[8]}">
					<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[8]}">
				</a>
			<?php }else{?>
				<a href="#">
					<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-15.png" alt="">
				</a>
			<?php }?>-->
		<!--<a href="##">
			<img src="__SHOP_DEFAULT__/store/style/style5/images/cha6-15.png">
		</a>-->
	</ul>
</div>
		


<!-- 引入幻灯片JS --> 
<script type="text/javascript" src="__SITE_RESOURCE__/js/jquery.flexslider-min.js"></script> 
<!-- 绑定幻灯片事件 --> 
<script type="text/javascript">
	$(window).load(function() {
		$('.flexslider').flexslider();


	    // 图片切换效果
	    $('.goods-thumb-scroll-show').find('a').mouseover(function(){
	        $(this).parents('li:first').addClass('selected').siblings().removeClass('selected');
	        var _src = $(this).find('img').attr('src');
	        _src = _src.replace('_60.', '_240.');
	        _src = _src.replace('-60', '-240');
	        $(this).parents('dt').find('.goods-thumb').find('img').attr('src', _src);
	    });
	});
</script>
<?php } ?>
	
{/block}
